Repository navigation
feat!: Rest gets an end and Focus, the bubble says why she spoke, and her lines that cannot speak now wait and go out together - #2168
Merged
Conversation
…es the Rest choices
…e do not disturb context line
…e she rests Rest is one stored record with a choice and its end. The Character menu opens it as a list in the right column, the status pill and the tray follow it, and client_context carries a do not disturb line while a Rest, a Focus or an active-hours quiet span holds her own turns. BREAKING CHANGE: the yui_run pace.rest row takes "hour", "tonight", "morning", "until_off", "focus_25", "focus_50" or "off" in place of a boolean.
…after midnight, and the tray sends only a change
…he Rest derivation in settings/rest
A bundle's trigger now carries its own fire time and the other members it waited with, projected through the same cue, milestone, screen and addressed projections as a single trigger. The rendered block adds one `waited:` line per member on a self-started turn and on the riders of a user turn, and the bubble names a bundle by its first line plus the rest. Breaking: the signal line stamps `HH:MM local, Nmin ago` instead of the ISO UTC time. The screen `recent` buffer leaves the contract and the rendered block; the waiting list keeps the newest three screen reactions instead.
…t and go out together
The waited block opens with one line that names the character as the actor, says the candidates are still open and have not been spoken to, and that the backend picks among them. Item lines are past events with their age and local clock, and a waited item keeps its cue note and last together line. An idle cue's idle duration now includes its wait. A waited screen reaction renders as a past event and drops the present-tense dwell clause, so its app rides on the projection. The headline age appears only after a minute, the signal clock helper is local to the renderer, and the bubble counts a waited member only when it carries an event name and a numeric ts.
…st and go out together A self-started candidate held by do-not-disturb, the proactive gap, a live turn, playback, absence or the hourly cap now waits in the dispatcher's waiting list instead of being dropped. At a free slot every admissible entry goes out as one turn: the top-ranked envelope plus payload.waited, with the drained batched signal groups as payload.signals. A user message carries every entry that does not expire on user activity and the buffered groups. A self-started turn the user cancels returns to the list with its original times. - guardrails split into arrive (debounce), canSpend and spend; a bundle spends one slot once the turn lock grants - the batched signals buffer leaves only through the dispatcher's drain and the batch timer; its edge catch-ups are gone - a schedule cue is persisted as fired only once its turn ends ok (markSpoken) - each pet window's dispatcher reads its own presence BREAKING CHANGE: the drop reasons dnd, global_gap and stale_pending are gone (waiting_evicted and waiting_expired join); Guardrails.evaluate is replaced by arrive/canSpend/spend; the screen source no longer suppresses at the gap or carries `recent`, and the screen.json `recent_cap` key, its setting row and its Quick controls knob are deleted; ScheduleSource.restore is replaced by markSpoken.
…e slot, and cancel leaves the waiting list
…ctivity entries, and a buffered batched group leaves at the next edge
…stop expires the on-activity waiting entries
…ored fired Thread group leaves on the next drain
… Thread group handed back leaves on the next drain
…modules, and the schedule source stamps each cue's expires_at
…o yet The yui API gains a waiting namespace in every Tauri pet window. list() returns one short row per waiting entry and per buffered signal group: the id, kind, label, local clock and minutes waited. read(id) answers the projected waiting item or the signal group in full, and an unknown id as an error value. The app wiring builds the plain rows from the dispatcher's waiting list and a read-only peek of both signal buffers, late-bound because the tools exist before the dispatcher and the sources. The screen projection exposes the app so a waiting screen row names it.
…p() lists yui.waiting
…t spoken to yet
…the glossary, design, architecture map and project structure Adds the rest-and-trigger mock and its README row. The map drops the do-not-disturb store and gate names for Rest, and adds the waiting list, the trigger line and the yui.waiting rows. The Rest store keeps its yui.dnd key.
This was referenced Nov 28, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Rest gets an end time and Focus, the bubble says why she spoke, and her own lines that cannot speak now wait in one list instead of being dropped (D-79, D-88, D-71, D-73, D-89).
Rest and Focus (#2113, Task A). The Rest › list holds For 1 hour, Until tonight (00:00), Until tomorrow morning (08:00), Until I turn it off, and Focus 25 / 50 min. While one runs, a status row and End now lead the list. From 00:00 to 07:59 Until tonight is hidden, and
yui_runrefuses it then too. The Rest pill and the status pill show the end ("Rest · 08:00", "Focus · 18 min", "Quiet · 12:00" in an Active hours off span). The tray check follows a running Rest or Focus.client_contextgets ado not disturb:line while Rest, Focus or an off span holds her own turns; backend-started turns are untouched (#1964).Trigger line (#2113, Task C). A turn she started shows why in the bubble's quote slot: a schedule cue's time and label, an idle cue's label, "First time today", a screen switch's app, or the character who spoke to her. Signal turns keep their source lines; touch, drag and drop show none. A waited turn adds
+N.Waiting list (#2166, Tasks E, F, F5). One ranked list at the admission point replaces the drops for Rest, the proactive gap, a live turn, playback and the hourly cap.
expires_at); idle cues, gesture reactions and screen reactions on the next user activity (a user turn, a gesture, or Stop).guardrailssplits intoarrive(debounce, drops),canSpend(no spend) andspend(after the turn gate grants).client_context: a waited turn names its open candidates, each a past event with local time and age, its cue note andlast togetherkept, and an idle cue's idle time counted up to send time.yui.waiting.list()/read(id)inyui_runshow what waits, one short row each.Breaking changes
yui_runpace.restboolean"hour" | "tonight" | "morning" | "until_off" | "focus_25" | "focus_50" | "off"yui.dnd{enabled}{choice?, startedAt?, endsAt?}; an old value reads as off (no migration)client_contextsignal stamp@2026-11-27T03:31:00.000Z@12:31 local, 9min agoclient_contextscreenrecent switcheslines,TriggerMeta.screen.recentconfigs/screen.jsonrecent_cap, its Quick controls row, itsyui_runrow,screen.recent_cap_*i18n keysdnd,global_gap,stale_pendingwaiting_evicted,waiting_expiredrelease()sends batched groups alone on the edge into a free slotdnd_toggle {enabled, via}rest_set {choice, via}Related issues
Closes #2113
Closes #2166
Closes #1964
Part of #2108
Related decisions / docs
D-71, D-73, D-79, D-88, D-89.
Touched docs:
docs/reference/client-context.md,docs/reference/client-tools.md,docs/reference/logging.md,docs/reference/signals-ingress.md,docs/reference/configuration.md,docs/agent-guide/architecture/map.js,docs/agent-guide/project-structure.md,docs/agent-guide/build-run.md,DESIGN.md,GLOSSARY.md,mocks/character-window/rest-and-trigger.html(+mocks/README.md).Runtime evidence (required for UI / DOM / runtime behavior)
do not disturb: the character is resting at the user's request (for 10min); the rest ends at 22:31 local. The model answered the user turn normally, as intended (Rest holds only her own turns). One sample cannot show whether it read the line.Merge danger
Door: one-way for the stored Rest record (an old
{enabled: true}reads as off after the update) and for theclient_context/yui_runcontract a backend may parse; two-way for everything else. Blast radius: every self-started turn in every pet window goes through the new admission; a defect there holds or bunches her own lines.Verification
pnpm buildpasses (includes tsc typecheck)pnpm testpassespnpm lintpasses (biome format + lint)cargo test/cargo clippypass (Rust changes) — no change undersrc-tauri/pnpm gateson the integration branch at the final merge: all 16 gates exit 0 (cargo clippy/test skipped, no Rust change). Red runs, every new case red on an assertion before its implementation: Task A 78 + 2, Task C 19, Task E 43 + 2 + 2 + 3, Task F 11 + 6, F5 6.Review: spec review before code (gpt-6.2 sol for #2113, glm-5.4 for #2166, one model per spec); Task A and Task E two-axis (standards + spec), Tasks C and F single, docs once. Each round's findings were fixed by the implementing agent.
Checklist (YUI principles)
docs/reference/client-context.mdalongside the codedocs/agent-guide/architecture/map.jscarries every module, part, and exchange this PR adds, removes, or changes (or none changed)generate_expresstool-call argumentsconfigs/skip-testslabel justified)